namespace C1.Util
{
    using System;
    using System.Drawing;
    using System.Windows.Forms;

    internal class SystemInformation
    {
        private static Font _font;
        private static int _hsbh = -1;
        private static int _vsbw = -1;

        private static void GetInfo()
        {
            VScrollBar bar = new VScrollBar();
            _vsbw = bar.Width;
            bar.Dispose();
            HScrollBar bar2 = new HScrollBar();
            _hsbh = bar2.Height;
            bar2.Dispose();
            TextBox box = new TextBox();
            _font = box.Font;
            box.Dispose();
        }

        internal static Font DefaultFont
        {
            get
            {
                if (_font == null)
                {
                    GetInfo();
                }
                return _font;
            }
        }

        internal static int DoubleClickTime
        {
            get
            {
                return 500;
            }
        }

        internal static int HorizontalScrollBarHeight
        {
            get
            {
                if (_hsbh < 0)
                {
                    GetInfo();
                }
                return _hsbh;
            }
        }

        internal static int VerticalScrollBarWidth
        {
            get
            {
                if (_vsbw < 0)
                {
                    GetInfo();
                }
                return _vsbw;
            }
        }
    }
}

